home *** CD-ROM | disk | FTP | other *** search
- '************************
- '*\ /*
- '* Custom mouse zones *
- '*/ \*
- '************************
- '
- ' By Andrew Crowe
- ' andrewcrowe@enterprise.net
- '
-
- Rem These set up the zones!
-
-
- Dim ZO(7,3),AN(NRN,1),ANAL(2)
-
- '
- 'ZO(n,0) = X1 ZO(n,1) = Y1 ZO(n,2) = X2 ZO(n,3) = Y2
- '
- '
- ZO(0,0)=40 : ZO(0,1)=48 : ZO(0,2)=148 : ZO(0,3)=68
- B=1
- ZO(B,0)=40 : ZO(B,1)=128 : ZO(B,2)=148 : ZO(B,3)=148
- B=2
- ZO(B,0)=40 : ZO(B,1)=152 : ZO(B,2)=148 : ZO(B,3)=172
- B=3
- ZO(B,0)=40+120 : ZO(B,1)=128 : ZO(B,2)=148+120 : ZO(B,3)=148
- B=4
- ZO(B,0)=40+120 : ZO(B,1)=152 : ZO(B,2)=148+120 : ZO(B,3)=172
- B=5
- ZO(B,0)=64 : ZO(B,1)=72 : ZO(B,2)=104 : ZO(B,3)=88
- B=6
- ZO(B,0)=64 : ZO(B,1)=88 : ZO(B,2)=96 : ZO(B,3)=104
- B=7
- ZO(B,0)=58 : ZO(B,1)=108 : ZO(B,2)=106 : ZO(B,3)=125
-
-
- Rem This drawers some buttons
-
- For B=0 To 7
- Ink B+6
- Bar ZO(B,0),ZO(B,1) To ZO(B,2),ZO(B,3)
- Ink 0
- Box ZO(B,0),ZO(B,1) To ZO(B,2),ZO(B,3)
- Next
-
-
- Print At(0,2);"Press the blue button to quit"
-
-
- Do
-
-
-
- X=X Screen(X Mouse)
- Y=Y Screen(Y Mouse)
-
- If Mouse Key
- Print At(0,0);" "
-
- Rem This checks all the buttons
-
- For A=0 To 7
- If X>ZO(A,0) and Y>ZO(A,1) and X<ZO(A,2) and Y<ZO(A,3)
- Print At(0,0);"You Pressed zone";A;" "
-
- Rem Put button handeling code here
-
- If A=0 : Rem Blue = Quit
- End
- End If
-
- End If
- Next
- End If
-
-
- Wait Vbl
-
- Loop
-
-